<style>

</style>
<div>
    <form class="form-horizontal bv-form"  role="form"  id="updateForm">
        <fieldset>
            <legend>基本信息</legend>
            <div class="form-group">
                <label class="col-sm-3 control-label">学生</label>
                <div class="col-sm-6">
                    <input type="text" disabled class="form-control" name="l_studentid" value="{$data['stu_nickname']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">所选课程</label>
                <div class="col-sm-6">
                    <select {if $can==0}readonly{/if} class="form-control" name="l_subjectid" style="height:32px;">
                        {volist name='subject' id='s'}
                        <option {if $s['s_id']==$data['l_subjectid']} selected {/if} value="{$s['s_id']}">{$s['s_name']}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">所选老师</label>
                <div class="col-sm-6">
                    <select {if $can==0}readonly{/if} class="form-control" name="l_teacherid" style="height:32px;">
                        {volist name='teacher' id='t'}
                        <option {if $t['tea_id']==$data['l_teacherid']} selected {/if} value="{$t['tea_id']}">{$t['tea_name']}</option>
                        {/volist}
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">上课日期</label>
                <div class="col-sm-6">
                    <input {if $can==0}readonly{/if} id="createtime_update" type="text" class="form-control" name="l_date" value="{$data['l_date']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">上课时间</label>
                <div class="col-sm-6">
                    <input {if $can==0}readonly{/if} type="number" min="8" step="1" max="21" class="form-control" name="l_hour_start" value="{$data['l_hour_start']}">
                    <span style="font-size: 12px;">PS：8代表8~9点的课，最后一节课填21，即21~22点的课</span></div>

            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">预约状态</label>
                &nbsp;&nbsp;&nbsp;
                <div class="col-sm-5">
                    <label><input type="radio" {if $can==0}disabled{/if} name="l_status" value="1" {if $data.l_status == 1} checked {/if}>&nbsp;&nbsp;&nbsp;已预约</label>
                    <label style="margin-left:30px;"><input {if $can==0}disabled{/if} type="radio" name="l_status" value="2" {if $data.l_status == 2} checked {/if}>&nbsp;&nbsp;&nbsp;取消预约</label>
                </div>
            </div>

            <div id="showorno" {if $data['l_status']!=1} style='display:none;' {/if}>
                <div class="form-group">
                    <label class="col-sm-3 control-label">学生状态</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="l_stu_status" value="{$data['l_stu_status']}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">学生评价</label>
                    <div class="col-sm-6">
                        <textarea class="form-control" name="l_stu_pingjia">{$data['l_stu_pingjia']}

                        </textarea>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">备注</label>
                <div class="col-sm-6">
                    <textarea class="form-control" name="l_remark">{$data['l_remark']}

                    </textarea>
                </div>
            </div>

            <input type="hidden" name="l_id" value="{$data['l_id']}">
        </fieldset>
    </form>
</div>
<script>
    $('#createtime_update').datepicker({
        format : "yyyy-mm-dd",
        todayBtn : "linked",
        autoclose : true,
        todayHighlight : true,
        clearBtn : true
    });
    $('input:radio').change(function () {
        var status = $(this).val();
        if(status == 1){
            $('#showorno').css('display','block');
        }else{
            $('#showorno').css('display','none');
        }
    });
</script>